package p532.p1.implementations;

import java.util.TimerTask;
import p532.p1.interfaces.abGameBoard;

/**
 *
 * @author han
 */
public class GameExecution extends TimerTask {

    private abGameBoard gameBoard;

    public GameExecution(abGameBoard gameBoard) {
        this.gameBoard = gameBoard;
    }

    @Override
    public void run() {
        //TODO all the game rules and logic
        
        if (gameBoard.moveAllObjects()) {
        	gameBoard.clearGame();
		}
        gameBoard.checkCollision();
    }
}
